package com.lancoo.ccas53.pojo.dto;

import com.lancoo.ccas53.pojo.common.PageInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * @Author: mabolin
 * @Date: 2024-07-02-9:35
 * @Description:
 */
@Data
public class StuCourseDto implements Serializable {
    @ApiModelProperty("课程限制")
    private Integer courseLimit;
    @ApiModelProperty("学分限制")
    private Double creditLimit;
    @ApiModelProperty("当前总学分")
    private Double currentTotalPoint;
    @ApiModelProperty("当前选课数量")
    private Integer currentCourse;
    @ApiModelProperty("可选教学班分页数据")
    private List<SelectedCourse> selectedCourseList;
    @ApiModelProperty("可选教学班分页数据")
    private PageInfo<StuCourse> pageInfo;


    @Accessors(chain = true)
    @Data
    public static class SelectedCourse {
        @ApiModelProperty("课程id")
        private Long courseId;
        @ApiModelProperty("课程名称")
        private String courseName;
        @ApiModelProperty("课程代码")
        private String courseCode;
        @ApiModelProperty("基础平台学院id")
        private String baseCollegeId;
        @ApiModelProperty("课程学分")
        private Double credit;
        @ApiModelProperty("学院名称")
        private String collegeName;
        @ApiModelProperty("课程类型id")
        private String courseTypeId;
        @ApiModelProperty("课程类别")
        private String courseType;
        @ApiModelProperty("课程性质 1必修  2选修")
        private Integer courseNature;
        @ApiModelProperty("1:主修  2：辅修")
        private Integer studyNature;
        @ApiModelProperty("1课程  2环节")
        private Integer flag;
        @ApiModelProperty("0未选 1已选 ")
        private Integer status;
        private teachingClass teachingClass;
    }

    @Accessors(chain = true)
    @Data
    public static class StuCourse extends SelectedCourse {
        private List<teachingClass> teachingClassList;
    }

    @Accessors(chain = true)
    @Data
    public static class teachingClass extends SelectedCourse {
        @ApiModelProperty("教学班id")
        private Long teachingClassId;
        @ApiModelProperty("教学班名称")
        private String teachingClassName;
        private String teacherName;
        @ApiModelProperty("助教教师")
        private String assistantName;
        private List<schedule> schedule;
        @ApiModelProperty("已选数量")
        private Long selectedNum;
        @ApiModelProperty("容量")
        private Integer num;
    }

    @Accessors(chain = true)
    @Data
    public static class schedule {
        private String courseName;
        private String teachingClassName;
        @ApiModelProperty("周次，用字符串表示二进制形式")
        private String week;
        private Integer teacherId;
        private String teacherName;
        @ApiModelProperty("助教id")
        private Integer assistantId;
        @ApiModelProperty("助教教师")
        private String assistantName;
        @ApiModelProperty("0：未锁定课表；1：导入的课表；2：锁定的课表")
        private Integer flag;
        @ApiModelProperty("课表所属类型 0:环节  1讲授 2实验 3上机 4其他")
        private Integer hourType;
        @ApiModelProperty("教室id")
        private Long roomId;
        @ApiModelProperty("教室名称")
        private String roomName;
        @ApiModelProperty("课时编码")
        private String timeCode;
        @ApiModelProperty("连上节次")
        private Integer connectSection;
        @ApiModelProperty("连上分组标记")
        private String timeGroup;
        @ApiModelProperty("课表id")
        private Long scheduleId;
    }

}
